/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import domain.player.Player;
import gui.GUIController;
import java.awt.BorderLayout;
import javax.swing.JFrame;

/**
 *
 * @author Mattis
 */
public class GameFrame extends JFrame{
    private GameBoard gameBoard;
    private MenyPanel menuPanel;
    
    private GUIController guiController;
    
    public GameFrame(){
        setConfig();
        addComponents();
    }
    
    public GameFrame(GUIController guiController){
        this.guiController = guiController;
        setConfig();
        addComponents();
    }
    
    private void setConfig() {
        this.setLayout(new BorderLayout());
        this.setSize(400, 400);
        this.setVisible(true);
        this.setLocationRelativeTo(null);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        // this.setBackground(Color.red);
    }
    
    
    
    public static void main(String[] args){
        new GameFrame();
    }
    
    
    public void updateCurrentPlayer(Player currentPlayer){
        
    }
    
    private void addComponents(){
        gameBoard = new GameBoard();
        menuPanel = new MenyPanel();
        this.add(menuPanel, BorderLayout.NORTH);
        this.add(gameBoard, BorderLayout.CENTER);
    }
}
